<?php

use Illuminate\Database\Seeder;
use Illuminate\Database\Eloquent\Model;

class DatabaseSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        Model::unguard();

        $this->call(RoleTableSeeder::class);
        $this->call(UserTableSeeder::class);
        if(env('APP_ENV') == 'local'){
            $this->call(InstallInfoTableSeeder::class);
            $this->call(DeviceTableSeeder::class);
            $this->call(UserInfoTableSeeder::class);
            $this->call(DeviceRecordTableSeeder::class);
            $this->call(AfterServiceTableSeeder::class);
            $this->call(ChargeRecordTableSeeder::class);
            $this->call(MaintainInfoTableSeeder::class);
        }

        Model::reguard();
    }
}
